php forum
php mysql forum
php mysql smarty
 
Topic Options
#147241 - 09/09/01 06:21 AM [6.1x] ViewPMreply
vent Offline
Junior Member

Registered: 09/09/01
Posts: 5
This is Sleepy's Hack "ViewPMreply"

#############################
# Sleepy custom hack
#
# To view PM when replying
#
# ###########################
#
# Only 2 files need changing
#
# public_pm_form.pl & ubb_pm.cgi
#
############################
###################
#OPEN public_pm_form.pl
###################
#find
###################

print<<NearBottom;
$TBB




<CENTER>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}">
</CENTER>



</FORM>



NearBottom

#################
# replace with
#################

print<<NearBottom;
$TBB




<CENTER>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}">
</CENTER>



</FORM>



<CENTER>
$i_frame
</CENTER>



NearBottom

#################
# save and exit
#################
# open ubb_pm.cgi
#################
# find
#################

sub pm_reply {
local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

################
# replace
################

sub pm_reply {
local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

###############
# find
###############

# get pm topic!
if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") {
require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi";
} else {
&StandardHTML("$vars_wordlets_err{no_such_pm}");
}

###############
#Below that ADD
###############

# set topic viewer:
$go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}";


$i_frame_alt = &build_topic_review;

if ($vars_display{InlineFrame} eq 'TRUE') {
$i_frame = qq(<IFRAME FRAMEBORDER="1" ALIGN="center" width="$vars_style{TableWidth}" HEIGHT="200" SCROLLING="YES" SRC="$go_to">
$i_frame_alt
</IFRAME> );
} else {
$i_frame = $i_frame_alt;
}

##################
## Save and done
##################

__________________________________________________________

But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work.
Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much!


######################################################
sub build_topic_review {
local(@sort_topic, $total_posts, $summary, $row, $alt_color2, @posted, @user_profile, $listed_name, $this_user_number);
@sort_topic = sort(@this_topic);
$total_posts = @sort_topic;

if (($total_posts > 26) &#0124;&#0124; ($post_permiss eq "private")) {
$summary = qq(<font size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}" face="$vars_style{FontFace}"><a href="$go_to" target="_blank"> $vars_wordlets{topic_review_link}</a></font> );
} else {
$summary = qq~
$TBT
<tr>
<td colspan="2" align="left" background="$vars_config{NonCGIURL}/bg1.jpg">
<font size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}" face="$vars_style{FontFace}">
<b>$vars_wordlets{topic_review}</b>
</font></td></tr>
~;

$alt_color2 = "$vars_style{AltColumnColor2}";

foreach $row(@sort_topic) {
if ($alt_color2 eq "$vars_style{AltColumnColor1}") {
$alt_color2 = "$vars_style{AltColumnColor2}";
} else {
$alt_color2 = "$vars_style{AltColumnColor1}";
}

if ($row !~ /^A/) {
@posted = split(/||/, $row);

if (($posted[8] eq 'unreg') or ($posted[8] eq '')){
$listed_name = $posted[2];
} else {

if ($posted[11] eq '') {

# old post- we need to find user number
$this_user_number = &GetUserNumber($posted[2]);
if ((-e "$vars_config{MembersPath}/$this_user_number.cgi") && ($this_user_number ne '')) {
@user_profile = &OpenProfile("$this_user_number");
} else {
$user_profile[15] = $posted[2];
}

} else {

# already have user number
if (-e "$vars_config{MembersPath}/$posted[11].cgi") {
@user_profile = &OpenProfile("$posted[11]");
} else {
$user_profile[15] = "$posted[10]"; chomp($posted[10]);
}

}

chomp($user_profile[15]);
if ($user_profile[15] ne '') {
$listed_name = $user_profile[15];
} else {
$listed_name = $posted[2];
}
chomp($listed_name);

}
$summary .= qq~
<tr bgcolor="$alt_color2">
<td valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$listed_name
</font></td>
<td><font size="$vars_style{TextSize}" face="$vars_style{FontFace}">$posted[6]</font>
</td></tr>
~;
}

}
$summary .= "$TBB

";
}
return($summary);

}

Top
#147242 - 09/09/01 02:15 PM Re: [6.1x] ViewPMreply
Brett Offline
Moderator

Registered: 05/04/01
Posts: 992
Loc: Little Rock, AR
Very cool! I'll install this asap!

Top
#147243 - 09/10/01 04:33 AM Re: [6.1x] ViewPMreply
Lord Dexter Offline
Member

Registered: 05/25/01
Posts: 6503
Loc: Melbourne, Australia
Good hack. It would be good if you could document it.

Top
#147244 - 01/02/02 03:18 PM Re: [6.1x] ViewPMreply
Corona Offline
Member

Registered: 06/25/01
Posts: 199
This didn't work for 6.1.0.3. So, i Edited it as follows:

#############################
# Sleepy custom hack
#
# To view PM when replying
#
# ###########################
#
# Only 2 files need changing
#
# public_pm_form.pl & ubb_pm.cgi
#
############################
###################
#OPEN public_pm_form.pl
###################
#find
###################

print <<NearBottom;
$TBB




<CENTER>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}">
</CENTER>



</FORM>



NearBottom

#################
# replace with
#################

print <<NearBottom;
$TBB




<CENTER>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}">
</CENTER>



</FORM>



<CENTER>
$i_frame
</CENTER>



NearBottom

#################
# save and exit
#################
# open ubb_pm.cgi
#################
# find
#################

sub pm_reply {
local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

################
# replace
################

sub pm_reply {
local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

###############
# find (do this twice)
###############

# get pm topic!
if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") {
require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi";
} else {
&StandardHTML("$vars_wordlets_err{no_such_pm}");
}

###############
#Below that ADD
###############

# set topic viewer:
$go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}";


$i_frame_alt = &build_topic_review;

if ($vars_display{InlineFrame} eq 'TRUE') {
$i_frame = qq(<IFRAME FRAMEBORDER="1" ALIGN="center" width="$vars_style{TableWidth}" HEIGHT="200" SCROLLING="YES" SRC="$go_to">
$i_frame_alt
</IFRAME> );
} else {
$i_frame = $i_frame_alt;
}

##################
## Save and done
##################

__________________________________________________________

But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work.
Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much!


######################################################

See original hack at top of forum for further information, i didn't need to continue past this point.

Top
#147245 - 01/02/02 06:39 PM Re: [6.1x] ViewPMreply
Soul Survivor Offline
Member

Registered: 12/30/01
Posts: 82
Cool! Now (not to downplay your work) someone just needs to make it so you can do things such as quote the PM you're replying to...just a thought

No problems installing here! Thx!
_________________________
can't find peace of mind but every corner's got a mcdonalds?!

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks